home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-M68K / MACHW.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  4KB  |  159 lines

  1. /*
  2. ** linux/machw.h -- This header defines some macros and pointers for
  3. **                    the various Macintosh custom hardware registers.
  4. **
  5. ** Copyright 1997 by Michael Schmitz
  6. **
  7. ** This file is subject to the terms and conditions of the GNU General Public
  8. ** License.  See the file COPYING in the main directory of this archive
  9. ** for more details.
  10. **
  11. */
  12.  
  13. #ifndef _ASM_MACHW_H_
  14. #define _ASM_MACHW_H_
  15.  
  16. /*
  17.  * head.S maps the videomem to VIDEOMEMBASE
  18.  */
  19.  
  20. #define VIDEOMEMBASE    0xf0000000
  21. #define VIDEOMEMSIZE    (4096*1024)
  22. #define VIDEOMEMMASK    (-4096*1024)
  23.  
  24. #ifndef __ASSEMBLY__
  25.  
  26. #include <linux/types.h>
  27.  
  28. /* Mac SCSI Controller 5380 */
  29.  
  30. #define    MAC_5380_BAS    (0x50F10000) /* This is definitely wrong!! */
  31. struct MAC_5380 {
  32.     u_char    scsi_data;
  33.     u_char    char_dummy1;
  34.     u_char    scsi_icr;
  35.     u_char    char_dummy2;
  36.     u_char    scsi_mode;
  37.     u_char    char_dummy3;
  38.     u_char    scsi_tcr;
  39.     u_char    char_dummy4;
  40.     u_char    scsi_idstat;
  41.     u_char    char_dummy5;
  42.     u_char    scsi_dmastat;
  43.     u_char    char_dummy6;
  44.     u_char    scsi_targrcv;
  45.     u_char    char_dummy7;
  46.     u_char    scsi_inircv;
  47. };
  48. #define    mac_scsi       ((*(volatile struct MAC_5380 *)MAC_5380_BAS))
  49.  
  50. /*
  51. ** SCC Z8530
  52. */
  53.  
  54. #define MAC_SCC_BAS (0x50F04000)
  55. struct MAC_SCC
  56.  {
  57.   u_char cha_a_ctrl;
  58.   u_char char_dummy1;
  59.   u_char cha_a_data;
  60.   u_char char_dummy2;
  61.   u_char cha_b_ctrl;
  62.   u_char char_dummy3;
  63.   u_char cha_b_data;
  64.  };
  65. # define mac_scc ((*(volatile struct SCC*)MAC_SCC_BAS))
  66.  
  67. /*
  68. ** VIA 6522
  69. */
  70.  
  71. #define VIA1_BAS    (0x50F00000)
  72. #define VIA2_BAS    (0x50F02000)
  73. #define VIA2_BAS_IIci    (0x50F26000)
  74. struct VIA
  75.  {
  76.   u_char buf_b;
  77.   u_char dummy1[0x199];
  78.   u_char buf_a;
  79.   u_char dummy2[0x199];
  80.   u_char dir_b;
  81.   u_char dummy3[0x199];
  82.   u_char dir_a;
  83.   u_char dummy4[0x199];
  84.   u_char timer1_cl;
  85.   u_char dummy5[0x199];
  86.   u_char timer1_ch;
  87.   u_char dummy6[0x199];
  88.   u_char timer1_ll;
  89.   u_char dummy7[0x199];
  90.   u_char timer1_lh;
  91.   u_char dummy8[0x199];
  92.   u_char timer2_cl;
  93.   u_char dummy9[0x199];
  94.   u_char timer2_ch;
  95.   u_char dummy10[0x199];
  96.   u_char sr;
  97.   u_char dummy11[0x199];
  98.   u_char acr;
  99.   u_char dummy12[0x199];
  100.   u_char pcr;
  101.   u_char dummy13[0x199];
  102.   u_char int_fl;
  103.   u_char dummy14[0x199];
  104.   u_char int_en;
  105.   u_char dummy15[0x199];
  106.   u_char anr;
  107.   u_char dummy16[0x199];
  108.  };
  109.  
  110. # define via_1         ((*(volatile struct VIA *)VIA1_BAS))
  111. # define via_2         ((*(volatile struct VIA *)VIA2_BAS))
  112. # define via1_regp     ((volatile unsigned char *)VIA1_BAS)
  113.  
  114. /*
  115.  * OSS/RBV base address 
  116.  */
  117.  
  118. #define OSS_BAS        0x50f1a000
  119. #define PSC_BAS        0x50f31000
  120.  
  121. /* move to oss.h?? */
  122. #define nIFR    0x203
  123. #define oIFR    0x202
  124.  
  125.  
  126. /* hardware stuff */
  127.  
  128. #define MACHW_DECLARE(name)    unsigned name : 1
  129. #define MACHW_SET(name)                (mac_hw_present.name = 1)
  130. #define MACHW_PRESENT(name)    (mac_hw_present.name)
  131.  
  132. struct {
  133.   /* video hardware */
  134.   /* sound hardware */
  135.   /* disk storage interfaces */
  136.   MACHW_DECLARE(MAC_SCSI_80);     /* Directly mapped NCR5380 */
  137.   MACHW_DECLARE(MAC_SCSI_96);     /* 53c9[46] */
  138.   MACHW_DECLARE(MAC_SCSI_96_2);   /* 2nd 53c9[46] Q900 and Q950 */
  139.   MACHW_DECLARE(IDE);             /* IDE Interface */
  140.   /* other I/O hardware */
  141.   MACHW_DECLARE(SCC);             /* Serial Communications Contr. */
  142.   /* DMA */
  143.   MACHW_DECLARE(SCSI_DMA);        /* DMA for the NCR5380 */
  144.   /* real time clocks */
  145.   MACHW_DECLARE(RTC_CLK);         /* clock chip */
  146.   /* supporting hardware */
  147.   MACHW_DECLARE(VIA1);            /* Versatile Interface Ad. 1 */
  148.   MACHW_DECLARE(VIA2);            /* Versatile Interface Ad. 2 */
  149.   MACHW_DECLARE(RBV);             /* Versatile Interface Ad. 2+ */
  150.   /* NUBUS */
  151.   MACHW_DECLARE(NUBUS);           /* NUBUS */
  152. } mac_hw_present;
  153.  
  154. /* extern struct mac_hw_present mac_hw_present; */
  155.  
  156. #endif /* __ASSEMBLY__ */
  157.  
  158. #endif /* linux/machw.h */
  159.